using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_BASE_FlowChartTreeMap : EntityTypeConfiguration<t_BASE_FlowChartTree>
    {
        public t_BASE_FlowChartTreeMap()
        {
            // Primary Key
            this.HasKey(t => t.FNodeID);

            // Properties
            this.Property(t => t.FNodeID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FNodeName)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FAcctType)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FTagString)
                .IsRequired()
                .HasMaxLength(1500);

            this.Property(t => t.FNodeName_Cht)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FNodeName_En)
                .IsRequired()
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("t_BASE_FlowChartTree");
            this.Property(t => t.FNodeID).HasColumnName("FNodeID");
            this.Property(t => t.FUserID).HasColumnName("FUserID");
            this.Property(t => t.FFlowChartID).HasColumnName("FFlowChartID");
            this.Property(t => t.FNodeName).HasColumnName("FNodeName");
            this.Property(t => t.FNodeIndex).HasColumnName("FNodeIndex");
            this.Property(t => t.FNodeType).HasColumnName("FNodeType");
            this.Property(t => t.FAcctType).HasColumnName("FAcctType");
            this.Property(t => t.FNodeLevel).HasColumnName("FNodeLevel");
            this.Property(t => t.FNodeParent).HasColumnName("FNodeParent");
            this.Property(t => t.FDetailFuncID).HasColumnName("FDetailFuncID");
            this.Property(t => t.FTagString).HasColumnName("FTagString");
            this.Property(t => t.FNodeName_Cht).HasColumnName("FNodeName_Cht");
            this.Property(t => t.FNodeName_En).HasColumnName("FNodeName_En");
        }
    }
}
